import { IMessagePublication } from '../IMessagePublication'

export class PublicationError {
    private cause: Error;
    private errorStr: string = "";
    private publication: IMessagePublication;

    setCause(e: Error) {
        this.cause = e;
        return this;
    }

    setErrorMessage(str: string) {
        this.errorStr = str;
        return this;
    }

    getCause(): Error {
        return this.cause;
    }

    getErrorMessage(): string {
        return this.errorStr;
    }

    setPublication(p: IMessagePublication) {
        this.publication = p;
        return this;
    }

    getPublication() {
        return this.publication;
    }
}